﻿@model A2.ERP.Models.t_Supplier

<section id="EditSupplier">
    <div class="card">
        <div class="card-header">
            <i class="icon SkyUI icon-edit"></i>
            编辑用户
        </div>
        <div class="card-body">
            <form class="updateSupplierFrm" method="put" action="/setting/EditSupplier">
                <div class="form-group" style="display:none;">
                    <label>供应商</label>
                    <input type="text" name="SupplierID" value="@Model.SupplierID" class="form-control" />
                </div>
                <div class="form-group">
                    <label>供应商</label>
                    <input type="text" name="SupplierName" value="@Model.SupplierName" class="form-control" />
                </div>
                <div class="form-group">
                    <label>所属地区</label>
                    <input type="text" name="Area" value="@Model.Area" class="form-control" />
                </div>
                <div class="form-group">
                    <label>联系人</label>
                    <input type="text" name="Linkman" value="@Model.Linkman" class="form-control" />
                </div>
                <div class="form-group">
                    <label>邮编</label>
                    <input type="text" name="PostCode" value="@Model.Email" class="form-control" />
                </div>
                <div class="form-group">
                    <label>通讯地址</label>
                    <input type="text" name="Address" value="@Model.Address" class="form-control" />
                </div>
                <div class="form-group">
                    <label>电话</label>
                    <input type="text" name="Tel" value="@Model.Tel" class="form-control" />
                </div>
                <div class="form-group">
                    <label>企业网站</label>
                    <input type="text" name="WebUrl" value="@Model.WebUrl" class="form-control" />
                </div>
                <div class="form-group">
                    <label>邮箱</label>
                    <input type="text" name="Email" value="@Model.Email" class="form-control" />
                </div>
                <div class="form-group">
                    <label>纳税号</label>
                    <input type="text" name="BankAccount" value="@Model.BankAccount" class="form-control" />
                </div>
                <div class="form-group">
                    <label>备注</label>
                    <input type="text" name="Description" value="@Model.Description" class="form-control" />
                </div>

                <div class="form-group">
                    <button type="submit" class="btn btn-primary submit">修改</button>
                </div>
            </form>
        </div>
    </div>
</section>

<script>
    ;
    !function () {
        var $tabPage = $('#EditSupplier');
        var $form = $('#EditSupplier .updateSupplierFrm');

        $form.submit(function (e) {
            e.preventDefault();

            $form.ajaxSubmit({
                type: 'PUT',
                dataType: 'json',
                success: function (e) {
                    $tab.reloadTab('#SysSupplierManager');
                    $tab.close($tabPage);
                }
            });
        });
    }();
</script>